import 'package:ladder_cash/generated/json/base/json_convert_content.dart';
import 'package:ladder_cash/app/com/model/login_user_info_model.dart';

LoginUserInfoModel $LoginUserInfoModelFromJson(Map<String, dynamic> json) {
  final LoginUserInfoModel loginUserInfoModel = LoginUserInfoModel();
  final String? username = jsonConvert.convert<String>(json['username']);
  if (username != null) {
    loginUserInfoModel.username = username;
  }
  final String? sessionId = jsonConvert.convert<String>(json['sessionId']);
  if (sessionId != null) {
    loginUserInfoModel.sessionId = sessionId;
  }
  return loginUserInfoModel;
}

Map<String, dynamic> $LoginUserInfoModelToJson(LoginUserInfoModel entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['username'] = entity.username;
  data['sessionId'] = entity.sessionId;
  return data;
}

extension LoginUserInfoModelExtension on LoginUserInfoModel {
  LoginUserInfoModel copyWith({
    String? username,
    String? sessionId,
  }) {
    return LoginUserInfoModel()
      ..username = username ?? this.username
      ..sessionId = sessionId ?? this.sessionId;
  }
}